﻿<%@ Page Title="" Language="C#"  MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Cs2102BookingSystem.Models.BOOKING>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">

	Booking History
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2 style="text-align:left; padding-left:5%;">Booking History</h2>
    
    <table  style="border-color:transparent;width:80%;border-collapse:separate;border-spacing:0px;margin: auto;" >
        <tr style="  text-align:left;text-indent:5px;background-color:Navy;color:White ">
            <th>
                Confirmation ID
            </th>
            <th>
                Visiting Country
            </th>
            <th>
                Hotel Name
            </th>
            <th>
                Room & Bed Type
            </th>
            <th>
                Arrival Date / <br />
                Departure Date
            </th>
            <th>
                
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr style="  border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:Gray;text-align:left;text-indent:5px">
            <td style="  border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:Gray;text-align:left;text-indent:5px">
                 <%: Html.ActionLink(item.BOOKINGID.ToString(), "BookingDetail", new { id = item.BOOKINGID })%>
            </td >
            <td style="  border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:Gray;text-align:left;text-indent:5px">
                <%: item.H_COUNTRY %>
            </td>
            <td style="  border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:Gray;text-align:left;text-indent:5px">
                <%: item.H_NAME %>
            </td>
            <td style="  border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:Gray;text-align:left;text-indent:5px">
                <%: item.R_ROOMTYPE %> with<br /> <%: item.R_BEDTYPE %>
            </td>
            <td style="  border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:Gray;text-align:left;text-indent:5px">
                <%: String.Format("{0:g}", item.STARTDATE) %><br /><%: String.Format("{0:g}", item.ENDDATE) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Go Back", "History") %>
    </p>

</asp:Content>

